home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / UTIL / Alpha 6.5.sit / Help / Manual < prev    next >
Text File  |  1996-08-18  |  81KB  |  1,893 lines

  1.       Copyright ゥ 1990-1996 Pete Keleher. All Rights Reserved
  2.  
  3.           (For more help, look under the system help menu!)
  4.  
  5. The Author(s) of this product are in no way liable for any direct or 
  6. indirect damage caused by the product. 
  7.  
  8. You may freely copy and distribute ALPHA, but please bear in mind that 
  9. ALPHA is Shareware.  If you decide to keep it, please register your copy 
  10. by selecting 'Register' from the 'Aboutノ' dialog.
  11.  
  12. I am collecting user-written Tcl procs at Alpha's home site.  If you have 
  13. written anything that you think may be of general interest, please send it 
  14. to me and I will make it available.
  15.  
  16. Alpha contains source from many places, but in particular I'm grateful to 
  17. Ray Johnson and Tim Endres for their working on porting TCL to the mac, and 
  18. to Tom Scavo and Tom Pollard for their Tcl code contributions.  The 
  19. following people have also provided considerable code and/or help debugging 
  20. the one or two bugs Alpha has had: Masatsugu Nagata, Karl J. Smith, Eric 
  21. Sink, David C. Black, Richard T. Austin, Henry Spencer, Vince Darley, and 
  22. Jerry Fowler.
  23.  
  24. What to do: USE THE MARKS MENU IN THIS FILE!.  This file contains "marks" 
  25. in a popup menu above the vertical scrollbar on the right, that let you 
  26. jump to different sections of this file.  Mouse-down on the curly braces.
  27.  
  28. Also, Alpha supports a limited form of hypertext. Clicking on green 
  29. underlined text executes a command associated with the underlined text, 
  30. usually taking you to other documentation. Control-<period> will bring you 
  31. back.  For example, clicking here takes you to more documentation of the 
  32. hypertext capabilities.  
  33.  
  34. Alpha's hypertext links can be used to perform arbitrary tasks, including 
  35. interaction with other applications.  Once you have Internet Config 
  36. installed, the following links will all be active:
  37.     Alpha's home site:        click here (or here if no Internet Config)
  38.     Mail to the author:        click here
  39.     
  40.  
  41. Alpha is a very powerful, multi-purpose editor that allows any program- 
  42. or user-defined function to be bound to any keystroke, or placed into 
  43. user-defined menus. Every menu is defined in the macro language Tcl by 
  44. one of the startup files ("alphaBits.tcl" or one of the files sourced 
  45. from inside it). 
  46.  
  47. Alpha uses Dr.  Ousterhout's Tool Command Language (Tcl) as an extension 
  48. language.  Click here for a more complete definition of the language.  Many 
  49. of the functions bound to keystrokes, as well as many of the functions in 
  50. the user-defined menus, are written in Tcl.
  51.  
  52. Callable functions in Alpha come in two different flavors.  First, there 
  53. are the basic Tcl commands, detailed here.  Second there are "Alpha commands",
  54. commands that relate specifically to Alpha. 
  55.  
  56. The only way to get to know the editor and the language is to try different 
  57. things out.  Play around.  Choose the menu item "Misc:List Bindings" to get 
  58. a listing of all the current keystoke bindings.  Look in "procs.tcl" for 
  59. definitions of many of the routines.  Look in "menus.tcl" for 
  60. definitions of most of the menus.  See the section on "GUI Details" for 
  61. more information about the various pieces of Alpha's windows. And 
  62. finally, please feel free to send suggestions/"feature" reports/questions 
  63. to me at keleher@cs.umd.edu.  I am not able to answer US postal mail, but 
  64. if you send it to me I will at least read it.  Have fun!
  65.  
  66.  
  67.  
  68.           GUI Details
  69.  
  70. Alpha's interface has several non-standard features. First, there is a status 
  71. window across the bottom of the primary window.
  72.  
  73. Second, the horizontal scrollbar can be turned on and off via the window 
  74. menu. The default for subsequent windows is controlled via the 
  75. global variable horScrollBar (look under "Modes:Flags").
  76.  
  77. Third, above the vertical scrollbar on the right is an icon w/ curly braces 
  78. ('{}'). This is the "Funcs" menu, which lists function definitions of the 
  79. the current window if the current mode is a programming language. By 
  80. default, the functions in this menu are sorted alphanumerically. This 
  81. feature can be turned off via the global flag 'sortFuncsMenu', making the 
  82. menu appear faster on slower machines.
  83.  
  84. Below the funcs menu is the "Marks" menu, which pops up over the icon w/ 
  85. the large 'M'. The "Marks" menu lists all marks for the current window, 
  86. and allows them to be cleared or automatically created (through the Tcl 
  87. proc 'markFile' that calls mode-specific routines). Above the "Funcs" menu, 
  88. a red disk icon appears if the window is currently dirty. Clicking on this 
  89. icon saves the file.
  90.  
  91. Directly above the vertical scrollbar is a black bar that can be used to 
  92. split any window into two independent panes showing the same buffer. 
  93. Windows are split by either dragging the black bar or using the 
  94. "Windows:Split Window" menu command. Windows are unsplit the same way. 
  95. Double-clicking on the bar can also be used to toggle whether the window 
  96. is split.
  97.  
  98. Command-clicking on the window name brings up a popup menu that shows the 
  99. complete pathname of the file.  Command-clicking anywhere else on the 
  100. titlebar brings up the mark menu. Option-clicking on the titlebar of a 
  101. window queries the Symantec project manager for include files, if 
  102. running. 
  103.  
  104. Option-clicking and dragging text enables rectangular editing.
  105.  
  106. Control-double-clicking on any type of paren or bracket hilites from the 
  107. paren or bracket to its mate.  Without the control key held down, only the 
  108. intervening text is selected.
  109.  
  110. Command-clicking on a selection passes it to the Internet Config app.
  111.  
  112. Cmd-double-clicking in *any* mode will attempt to open a URL in the 
  113. surrounding text and send it to your web browser. If this fails, Alpha then 
  114. tries a mode-specific procedure.
  115.  
  116. Command-double clicking on a word in a C file will try to find the 
  117. definition of the word. The first option is looking up the word in the 
  118. tag file. If the word is not a tag, or no tags have been specified, Alpha 
  119. attempts to lookup the word through the THINK Reference app. If you would like 
  120. Apple's Toolbox Assistant to be used instead, edit the proc 
  121. 'cmdDoubleClick'. In Tcl mode, the verb is looked up in the SystemCode 
  122. and UserCode directories, then in ":Help:Alpha Commands", and then 
  123. finally in ":Help:Tcl Commands".
  124.  
  125. Alpha also supports drag and drop editing.
  126.  
  127. The grow region in the lower right corner is replaced by a lock icon if the 
  128. file is read-only.  Read-only status can be changed by command-clicking in 
  129. this area.
  130.  
  131. See "Status Bar" for information describing the bar running across the 
  132. bottom of the screen.
  133.  
  134. Finally, Alpha provides many different ways to move windows around the 
  135. screen, most of which are accessible via the windows menu, i.e the menu 
  136. with the window icons. The first four items of the "Windows:Arrange" menu 
  137. move windows around a virtual box on the screen, defined by vars 
  138. 'tileLeft', 'tileRight', 'tileWidth', and 'tileHeight'. The first two 
  139. affect 'numWinsToTile' windows, the others always affect two. The gap 
  140. between windows is controlled by 'tileMargin' (vertical) and 'horMargin' 
  141. (horizontal). These can be used to allow for different window types, such 
  142. as that created by Aaron or similar GUI inits. The 'Unequal Vert' and 
  143. 'Unequal Hor' items split the space between two windows, with the 
  144. proportion assigned to the first controlled by 'tileProportion'. All of 
  145. these variables can be changed via the "Config:Global:Flags:Tiling" dialog. 
  146.  
  147.  
  148.  
  149.           Searches
  150.  
  151. ALPHA has a full repertoire of searching commands.  The 'find' command 
  152. brings up a dialog allowing the search and replacement text to be 
  153. specified.  The dialog also allows 'Forward', 'Ignore Case', 'Reg Expr', 
  154. and 'Word Match' options to be set.  These options can be toggled via the 
  155. keyboard by clover-<first letter of option>.  For example, clover-w toggles 
  156. the 'Word Match' option.
  157.  
  158. The 'Mult Files' option tells Alpha to search through all files in a given 
  159. file set.  Filesets can be specified in 'procs.tcl' (see the section on 
  160. filesets) or on the fly, via the "Create Filesetノ" item of the "File 
  161. Sets:Utilities" sub-menu. Filesets can be chosen via the popup fileset menu.
  162.  
  163. In addition to the current filesets, the fileset menu has an entry called 
  164. "Directory Scan". Selecting this menu item enables the "Scan Options" 
  165. button. This button, in turn, allows the specification of a directory and 
  166. a file pattern to be searched instead of a fileset. To set the directory, 
  167. hit the "Dir:" button. The pattern is used to select files of the 
  168. selected directory. The '*' wildcard character can be used to replace any 
  169. sequence of characters. For example, the pattern '*.c' will select any 
  170. file ending with ".c". If this doesn't work, be sure that you executed 
  171. all of the following steps:
  172.         1) select "Directory Scan" in the popup menu of the find dialog
  173.         2) Hit the "Scan Options" button.
  174.         3) Select a directory via the "Dir:" button.
  175.  
  176. Any search can also be a "Batch" search, a list of all matches in the 
  177. fileset or current window are displayed in a new window. A particular match 
  178. can be displayed by moving the cursor to a line in the file of matches and 
  179. selecting "Goto Match" from the Utils menu (also bound to control-c 
  180. control-c).
  181.  
  182. And finally, Alpha allows a library of useful search and replace texts to 
  183. be defined as a tcl list of lists (each sublist containing a name, search 
  184. text, and replacement text). This list, the 'patternLibrary' variable 
  185. defined at the end of 'procs.tcl', is used to create a popup menu in the 
  186. find dialog allowing these patterns to be easily entered.
  187.  
  188. Once the text and options have been set, the 'Search' menu contains several 
  189. commands for repeated searching, replacing, etc. 
  190.  
  191.  
  192.           Regular Expressions
  193.  
  194. If the variable 'regExpr' is true, the search functions interpret the 
  195. search text as regular expressions, which have the following elements:
  196.  
  197.  c        literal char.
  198.  ^        beginning of line.
  199.  $        end of line.
  200.  .        any character except carriage return.
  201.  [...]    character class, can use ranges such as '0-9'.
  202.           inside classes. Matches one character of the 
  203.           enclosed choices. Ex: '[ac0-2]' matches 'a', 
  204.           'c', '0', '1', or '2'.
  205.  [^...]   negated character class, matches anything but
  206.           the enclosed characters. ']' can be included
  207.           by putting it immediately after the '^'.
  208.  ¥t       tab.
  209.  ¥r       carriage return or line break.
  210.  *        zero or more occurrences of the previous
  211.           pattern. Ex: 'ab*' matches 'a', 'ab', 'abb',
  212.           'abbb' etc.
  213.  +        one or more occurrences of the previous 
  214.           pattern. 
  215.  ?        zero or one occurrences of the previous 
  216.           pattern. Ex: 'ab?' matches 'a' or 'ab'.
  217.  a|b      matches either a or b. If enclosed in
  218.           parenthesis, the extent of the alternated
  219.           expressions is limited. Ex: (pete|bob) 
  220.           matches either 'pete' or 'bob'.
  221.  (...)    The interior elements are grouped together. 
  222.  
  223. Regular expressions constructed from the above elements can be 
  224. concatenated to create larger expressions. 
  225.  
  226. The parenthesis also define substrings of the total matched string that 
  227. can be used either later during substitution. The substring delimited by 
  228. the pair of parenthesis that includes the nth left paren is denoted ¥n, 
  229. where n is 1, 2, .... 9.  '¥0' and '&' both refer to the matched text.
  230.  
  231. EXAMPLE: 
  232. The following regular expression will match either 'aabox' or 'bbbox':
  233.  
  234.               (aa|bb)box
  235.  
  236. See here for more details.  Regular expressions can be very difficult to 
  237. master, but they the following section shows how useful they can be.
  238.  
  239.  
  240.  
  241.           Searches, Incremental
  242.  
  243. Emacs users will be happy that both forward and backward incremental 
  244. searches are implemented. Incremental searches bypass the normal search 
  245. dialog and search for the current text after each keystroke. The result is 
  246. often much faster and less intrusive. Executing either while an incremental 
  247. search is in progress causes the search to proceed to the next instance of 
  248. the current text. Incremental search mode is exited when any other command 
  249. (executed through the menus or through bindings that include at least one of 
  250. the control key and the option key) is executed, or when the escape or 
  251. delete key is used. Typing control-w while incremental search is active 
  252. causes all the characters to the end of the next word boundary to be 
  253. added to the search.
  254.  
  255.  
  256.           Marks
  257.  
  258. Alpha allows the user to use "marks" to remember positions in files. Marks 
  259. "float". That is, if a mark is initially at position 312 and then five 
  260. characters are inserted at location 297, the mark's new value will be 317. 
  261. Alpha uses three different types of marks. 
  262.  
  263. The first is generically referred to as "the mark". The mark is set to the 
  264. current insertion point by the command 'setMark' (control-space by 
  265. default). The position in the file indicated by the blinking cursor is 
  266. referred to as the current insertion point. Many commands (such as "cut" 
  267. and "copy") can operate either on the currently selected (hilighted) text, 
  268. or the text between the current insertion point and "the mark". For 
  269. example, if you move the cursor to the beginning of the work "allybaba", 
  270. hit control-space (the status bar should say "Mark set"), move to the end 
  271. of the word and hit option-w (the status bar should say "Region copied"), 
  272. the effect is the same as if you had used the mouse to select the text and 
  273. then selected the "Copy" command from the "Edit" menu.
  274.  
  275. The second type of mark are the permanent marks. Permanent marks are set, 
  276. removed, and moved-to through the three corresponding menu items in the 
  277. "Search" menu. Permanent marks differ from the generic mark in that they 
  278. have names, there can be any number of them, and they are saved in the 
  279. resource fork if the file is subsequently saved.
  280.  
  281. Permanent marks can be access via the "Search:Named Marks" menu items, by 
  282. a popup menu called by mousing down on the curly braces above a vertical 
  283. scrollbar, or by command-mousing on a window's titlebar.
  284.  
  285. The third type of mark is the temporary mark. Like permanent marks, 
  286. temporary marks can be named and there can be any number of them. Unlike 
  287. permanent marks, temporary marks do not "dirty" the file, and they aren't 
  288. saved. So far, temporary marks are used exclusively to implement higher 
  289. order functions in TCL procedures. In the 5.0 release, temporary marks are 
  290. used to implement a "mark stack" and a for loop template.
  291.  
  292. At the time a file is saved, the marks for that file are stored into the 
  293. file's resource fork in an order determined by the variable 
  294. 'markSorting'. The choices are either 0 (no sorting), 1 (sort by file 
  295. position), or 2 (sort alphabetically).
  296.  
  297.  
  298.  
  299.  
  300.           Colorizing
  301.  
  302. Version 5.80 and up support automatic "colorizing" of text.  This is 
  303. controlled by the function 'regModeKeywords', which registers keywords to 
  304. colorize in a specific mode.  By default, color schemes are supplied for C, 
  305. C++, Pascal, Tcl, and TeX.  Colorizing can be turned off via the 'coloring' 
  306. flag.
  307.  
  308. You can add words to a given mode by creating a file called prefs.tcl 
  309. in the 'Alpha' subdirectory of the system preferences file, and using 
  310. regModeKeywords w/ the -a option.
  311.  
  312. Colors for keywords, strings, and comments (for applicable modes) can all 
  313. be changed via the "Config:Current Mode:Flags" menu item.
  314.  
  315. C/C++ allows function calls to be colorized.  Alpha will colorize words 
  316. immediately before left parens, assuming that they are function calls. 
  317. Use "Config:Current Mode:Flags" in C or C++ mode to turn this on.
  318.  
  319. Additionally, versions 6.02 and above allow the text color and window 
  320. background to be changed.  These are changed by redefining 'ForeGround' and 
  321. 'BackGround' in the "Config:Redefine Colors" menu.  The menu also allows all 
  322. eight of the primary colors to be redefined as well.  For instance, you can 
  323. redefine 'red', and any text that is currently red will then be the new 
  324. color you specify.  Finally, there are eight other colors 'Color_9' through 
  325. 'Color_15' that can be used though regModeKeywords etc, and values for 
  326. these can be redefined as well.
  327.  
  328.  
  329.  
  330.           C/C++
  331.  
  332. "C" and "C++" modes are selected either automatically when the file is 
  333. opened, by suffix, or via the mode popup menu on the status bar.  The 
  334. suffixes mapped to any mode can be changed via "Config:Current Mode:Flags".  
  335. To set up '*.c' and '*.h' to map to C++ rather than C, for instance, do the 
  336. following:
  337.     1) set the current mode to C
  338.     2) open up the mode dialog and remove *.c and *.h patterns from the 
  339.        'suffixes' data.
  340.     3) change the current mode to C++
  341.     4) open up the mode dialog and add *.c and *.h to 'suffixes'.
  342. That's it!
  343.  
  344. The rest of Alpha's support for C and C++ falls into four broad categories:
  345.     ・ "electric" editing
  346.     ・ colorizing
  347.     ・ marking
  348.     ・ interaction with CodeWarrior/Think
  349.  
  350. For electric editing, Alpha's default configuration is set up to perform 
  351. electric functions at left and right curly braces, semi-colons, and 
  352. carriage returns, all of which can be turned off via the 
  353. "Config:Current Mode:Flags" dialog. 
  354.  
  355. Alpha's C and C++ modes are configured by default with menus for 
  356. CodeWarrior, Symantec, Think Ref, and the Toolbox Assistant. You can prune 
  357. these to the two (or one) menu you want via the "Config:Current 
  358. Mode:Menus" menu item. Shift-click to select more than one.
  359.  
  360. Alpha automatically colorizes key-words, #defines, comments, strings, and 
  361. function calls. All colors can be changed via "Config:Current Mode:Flags", 
  362. or turned off entirely by selecting the "none" color option. New key-words 
  363. can be added by lines of the form:
  364.     regModeKeywords -a -k blue C {newword1 newword2}
  365. See the Colorizing section for more details.    
  366.  
  367. The Mark menu, accessible from the the curly brace icon above the vertical 
  368. scrollbar, allows C/C++ files to be automatically marked with a new mark 
  369. for each function in the file. You can jump to the resulting marks via the same 
  370. menu, command-clicking in the window's titlebar, or the "Text:Named 
  371. Marks:Goto" menu item. You can set up Alpha to automatically mark C/C++ 
  372. files that don't have marks on opening by selecting 'autoMark' from the 
  373. "Config:Current Mode:Flags" dialog.
  374.  
  375. Finally, Alpha is set up to closely cooperate with both Think and 
  376. Codewarrior. Follow the above links for more info.
  377.  
  378.  
  379.  
  380.  
  381.           File Detritus
  382.  
  383. The primary method of either reading or storing files with Alpha, or any 
  384. other Mac editor, is through the GetFile and PutFile dialogs. However, 
  385. Alpha's dialogs are not exactly like those of other applications. 
  386.  
  387. The GetFile dialog has two additional items: a "Read-only" checkbox and an 
  388. "All Files" checkbox.  The first allows you to open a file as read only.  
  389. Files in the read-only state can not be modified, only read.  A read-only 
  390. file is indicated by a lock icon replacing the grow zone icon.  Read-only 
  391. status can be toggled by command-clicking on the icon. The default action for 
  392. 'space' and 'backspace' when a file is read-only is to page forward 
  393. (closing at the bottom of the file) or backward.
  394.  
  395. The second checkbox, "All Files", allows Alpha to open any file rather 
  396. than just those of type 'TEXT'. The type of a file can be determined by 
  397. using the 'll' alias in the Tcl shell.
  398.  
  399.  
  400. The PutFile dialog is used to prompt the user for a new name under which to 
  401. save the contents of a window. This dialog has been enhanced by two popup 
  402. menus: "State" and "Format". "State" allows you to specify how much 
  403. information should be saved in the resource fork of files that you use. If 
  404. the state is set to "MPW", window position, current selection, tab sizes, 
  405. and font information are saved into the resource fork of your application 
  406. every time you open and close it, *even if you don't modify the file*. 
  407. Alpha still manages to coexist with build or make files because saving this 
  408. information does not change the modification date of the file. If the state 
  409. is set to "Think", neither the window position nor the current selection 
  410. are saved. If state is set to "None", no information is saved. The default 
  411. value for saved state can by changed by setting the Alpha variable 
  412. 'savedState' to "mpw", "think", or "none". Note that if a given file 
  413. already has mpw information in it when the file is open, Alpha will always 
  414. update that information when the file is closed. Note also that "marks" 
  415. are always saved in the resource fork whenever a file is saved, 
  416. regardless of the setting of the 'savedState' variable.
  417.  
  418. The "Format" menus allows the way Alpha terminates lines to be changed. 
  419. The Mac uses a carriage return to mark the end of a line, Unix uses a 
  420. linefeed, and IBM uses both (of course). Alpha can read and write any of 
  421. these formats, and can convert between them just by opening a file, 
  422. choosing "Save As", and changing the selection in this menu. Note that if 
  423. you are going to be sharing files with a Unix or IBM machine, you 
  424. probably don't want anything in your resource fork, so you'd probably 
  425. want to set 'savedState' to 'none' in your prefs.tcl file.
  426.  
  427.  
  428.           Menus
  429.  
  430. Alpha's menus are completely reconfigurable. Some of the menu items are 
  431. internal alpha commands, while others are Tcl procs defined in one of the 
  432. files of the "Tcl" subdirectory. Most of these procs are defined in 
  433. "procs.tcl". The following is an explanation of the default menus. The 
  434. explanations of items that are defined as Tcl procs are implemented by the 
  435. Tcl proc specified by "(proc <name>)", and can be found in one of the .tcl 
  436. files. All others are internal functions. 
  437.  
  438. Versions 5.98 and above use Ramon Felciano's Mercury MDEF to display 
  439. menus. In addition to allowing other modifiers to be shown in the menu, 
  440. this MDEF also allows alternates, items that change depending on the 
  441. state of the modifier keys. Alternate items are tagged below by the 
  442. modifier that must be depressed to display it.
  443.  
  444. File
  445.     New                      New file.
  446.     Openノ                   Open file.
  447.     Recentノ                    Menu of recently opened files. These same files
  448.                             can be opened via the 'editFile' (cmd-') proc
  449.                             from the submenu of the filesets menu.
  450.     Close                   Close file.
  451.     Close All (option)        Close all files.
  452.  
  453.     Save                       Save file.
  454.     Save All (option)        Save all files.
  455.     SaveAsノ                   Prompt for name to same file under.
  456.     Revert                   Revert to last saved version, throw away undo history. 
  457.     Revert To Backup (option) Revert to last backup copy, if any.
  458.         
  459.     Shell                   Start up command-line shell that interprets Tcl 
  460.                             commands. The shell has a few csh-type features, 
  461.                             such as 'ls', 'rm', etc. commands, as well as file 
  462.                             completion with the TAB key. 
  463.  
  464.     Page Setupノ               Set print options.
  465.     Print                  
  466.         Printノ                Print file directly.
  467.         
  468.         Kodex C Pretty Printer        Print through Kodex app.
  469.         Enscriptor Fancy Printer    Print through Enscriptor app.
  470.         Send PS to 'Drop・PS'        Print through 'Drop・PS' app.
  471.         
  472.     Print Allノ    (option)    Print all files.
  473.  
  474.     Quit                       Quit Alpha.
  475.  
  476. Edit
  477.     Undo                    Undo. 
  478.     Redo (option)            Redo. 
  479.     Load                    Execute either the window or the selection as Tcl 
  480.                             source. 
  481.     Cut                        Cut selection to scrap.
  482.     Cut & Append (option)    Cut and append selection to scrap.
  483.     Copy                    Copy selection to scrap.
  484.     Copy & Append (option)    Copy and append selection to scrap.
  485.     Paste                    Paste from scrap.
  486.     Paste Pop (option)        Immediately after a paste, use a previous paste 
  487.                             instead.
  488.     Yank                    Paste last deleted text. Concatenates together 
  489.                             consecutive, adjoining deletions.
  490.  
  491.     Emacs                    Lots of Emacs key bindings.
  492.     Twiddle                    Exchange characters bracketing the selection point.
  493.     Twiddle Words (option)    Exchange words bracketing the selection point.
  494.     Select All                Select entire file.
  495.     Select Paragraph (option)    Select current paragraph.
  496.     Clear                    Delete selection.
  497.  
  498.     Shift Left                Shift selection left one tab.
  499.     Shift Left Space (option)    Shift selection left one space.
  500.     Shift Right                Shift selection right one tab.
  501.     Shift Right Space (option)    Shift selection right one space.
  502.     Balance                    Select text out to the next set of matching braces.
  503.  
  504. Text
  505.     Fill Paragraph            "Fill" paragraph that contains the insertion (proc 
  506.                             fillParagraph).
  507.     Wrap Paragraph (option)    Break lines longer than 'fillColumn' in paragraph 
  508.                             containing insertion pt (proc wrapParagraph).
  509.     Sentence Paragraph (option-shift) - Forces each sentence to start on new 
  510.                             line. 
  511.     Fill Region                "Fill" selection subject to 'leftFillColumn' and 
  512.                             'fillColumn', (proc fillRegion).
  513.     Wrap Region (option)    Break lines longer than 'fillColumn' in selection 
  514.                             (proc wrapRegion).
  515.     Sentence Region (option-shift) - Forces each sentence to start on new 
  516.                             line. 
  517.  
  518.     Sort Lines                Sort selected lines (proc sortLines).
  519.     Spellcheck Window
  520.  
  521.     Zap Invisibles            Delete all chars in file w/ ASCII code < 32, except 
  522.                             for LF, TAB and CR.
  523.     Tabs To Spaces            Convert tabs to space runs.
  524.     Spaces To Tabs            Convert space runs to tabs.
  525.  
  526.     Strings
  527.         Insert Prefix            Prepend string 'prefixString' to every line in 
  528.                                 selection (proc insertPrefix).
  529.         Remove Prefix (option)    Remove prefix string from lines in selection 
  530.                                 (proc removePrefix). 
  531.         Insert Suffix            Append string 'suffixString' to every line in 
  532.                                 selection (proc insertSuffix).
  533.         Remove Suffix (option)    Remove suffix string from lines in selection 
  534.                                 (proc removeSuffix). 
  535.         Set Prefixノ                Change prefix string (proc setPrefix).
  536.         Set Suffixノ                Change suffix string (proc setSuffix).
  537.     Comment Line            Comment out line, considering mode.
  538.     Uncomment Line (option)    Un-comment line, considering mode.
  539.     Comment Box                Create a comment box around selected text.
  540.     UnComment Box (option)    Remove such a comment box.
  541.     Comment Paragraph        Comment out a paragraph.
  542.     Uncomment Paragraph        Uncomment a paragraph.
  543.     Downcase Region            Downcase all chars in region.
  544.     Upcase Region            Upcase all chars in region.
  545.  
  546.     Select Last                Select text last manipulated, such as from a paste.
  547.     Named Marks
  548.         Setノ
  549.         Gotoノ
  550.         Removeノ
  551.     Unnamed Marks
  552.         Setノ
  553.         Exchange Point and Mark
  554.  
  555. Search
  556.     Findノ                    Present a search dialog.
  557.     Search Start (option)    Return selection point to where the last search 
  558.                             started. 
  559.     Find Again                Search forward again w/ same settings.
  560.     Find Again Backward (option)    Search backward again w/ same settings.
  561.     Find in Next File        Restart multiple-file search in next file after 
  562.                             stopping at a match.
  563.     Enter Search String        Use the current selection as the search text.
  564.     Enter Replace String (option)    Use the current selection as replace text.
  565.  
  566.     Quick Find                Incremental search forward (grep, match words off, 
  567.                             ignore case on). Type chars to define string, 
  568.                             control-w adds the current word to the search
  569.                             string, control-s/r search for the same string again.
  570.     Reverse Quick Find        Same think in reverse.
  571.     
  572.     Replace                    Replace the selection.
  573.     Replace and Find Again    Replace the selection and search again forward.
  574.     Replace All (option)    Replace all of occurances of the search string 
  575.                             in the rest of the file.
  576.     Replace in Fileset (control)    Global replace in fileset.
  577.     
  578.     Push Position            Push current pos onto a "stack".
  579.     Pop Position            Pop last pos from stack and go to it.
  580.     Goto Line                Goto specific line number.
  581.     
  582. Utils
  583.     File Utils
  584.         Insert Path Nameノ    Prompt for a file and insert complete pathname in 
  585.                             window.
  586.         Insert Fileノ        Insert the text of another file.
  587.         File Removeノ        Remove a file.
  588.         File Infoノ            Display/edit info about a file.
  589.         Word Count            Count lines, words, chars in window (proc wordCount).
  590.     Compare
  591.         Windows                Compare top two windows, sending output to a third. 
  592.                             Selecting a line in the third window and hitting 
  593.                             return (or enter) moves that line to the top of 
  594.                             the window.
  595.         Files                Same as above, but prompts for files.
  596.         Directories            As above, but works for entire directories. 
  597.     Ascii Etc
  598.         Key Codeノ            Wait for key press and insert keycode and modifier 
  599.                             string suitable for key binding.
  600.         Key Asciiノ            Same as above, but use ascii form.
  601.         Get Asciiノ            Display ascii code for char to right of insertion.
  602.         Insert Asciiノ        Prompt for ascii code and insert character.
  603.         .....                Many emacs movement commands.
  604.     Kbd Macros
  605.         Start Keyboard Macro    Start creating anonymous macro.
  606.         End Keyboard Macro        Finish.
  607.         Execute Keyboard Macro    Execute.
  608.         Dump Macro                Dump to current file.
  609.  
  610.     Switch To                Bring other apps to front.
  611.     Internet Config            Start internet applications.
  612.     Send URL                Send selection as URL to proper internet app.
  613.     
  614.     Matching Lines            Find all lines that match a regular expression and 
  615.                             summarize in new window. (proc matchingLines). 
  616.     Goto Match                Jump to the original text specified by the current 
  617.                             line in a "Batch Find" or "Matching Lines" window.
  618.     Next Match                Next match.
  619.                                 
  620.     Cmd-Double Click        Look up and display definition of the selected 
  621.                             word. If in "C" or "C++" mode, use the file pointed 
  622.                             to by 'tagFile'. If in "Tcl" or "Shel" mode, look
  623.                             in "Alpha Commands", "Tcl Commands", and the "Tcl"
  624.                             subdirectory.
  625.                             
  626. Config
  627.     Current Mode            
  628.         Menusノ                Change current mode's menus.
  629.         Flagsノ                Change options for current mode.
  630.         Edit Prefs            Edit mode-specific preferences.  Loaded 
  631.                             after mode entered for the first time.
  632.         Source Prefs        Load current mode's preferences.
  633.         Describe            Describe current mode's variable settings and 
  634.                             bindings.
  635.         Changeノ                Change the current mode.
  636.  
  637.     Global
  638.         Menusノ                Set menus that will always be open.
  639.         Flagsノ                Global variables.
  640.             ...                
  641.         Edit prefs            Put your own arbitrary startup code here (used to be 
  642.                             "userStartup.tcl"). Loaded after all standard Tcl 
  643.                             code. 
  644.         Describe Bindingノ    Wait for a keystroke, then display that keystroke's 
  645.                             binding.
  646.         List Bindings        Create a new file containing all current key bindings.
  647.         List Functions        List all functions currently defined, both
  648.                             "core" functions (those coded in C), and those
  649.                             coded in the supplied Tcl files.
  650.     Describe Mode            Describes all bindings and settings for current mode.
  651.     Suffix Mappingsノ        Displays and allows editing of suffixes (really
  652.                             filename patterns) for all existing modes. 
  653.     View Saved Settingsノ     Any variables or flags that you modify during
  654.                             the course of a session are saved to files in the 
  655.                             system preferences folder when Alpha quits. 
  656.                             This function shows all such saved variables.
  657.     Remove Saved Settingsノ    This function allows settings to be removed.
  658.     
  659.     App Paths                List of paths to various folders. Allows 
  660.                             paths to be viewed, changed, or reset.
  661.     Install
  662.         Electric Alias        Loads David Black's "electric alias" routines, see 
  663.                             the appropriate help file.
  664.  
  665.     Set Font Tabsノ            Change font and/or tabs for current file.
  666.     Redefine Colorsノ        See Colorizing.
  667.             
  668. Wins (an icon with three windows)
  669.     Zoom                    Zoom windows in and out.
  670.     Single Page (option)    Resize as single page.
  671.     Choose A Window            Choose window to select from list (proc 
  672.                             chooseAWindow).
  673.     Iconify                    Toggle iconification of front window.
  674.     Arrange                    Rearrange open windows.
  675.  
  676.     Split Window            Split window into two panes, or unsplit.
  677.     Toggle Scrollbar        Toggle the horizontal scrollbar on the frontmost 
  678.                             window. The scrollbar can be enabled/disabled on 
  679.                             subsequent variables by changing the value of 
  680.                             the 'horScrollBar' flag.
  681.  
  682. File Sets            
  683.         Edit File            Edit a file from one of the filesets.
  684.  
  685.         (hierarchical menus containing fileset and their files, select file to 
  686.          edit)
  687.  
  688.         Utilities
  689.             Choose                Set current fileset.
  690.             Create Fileset        Create a fileset on the fly.
  691.             Delete FileSet        Delete a fileset.
  692.  
  693.             Create Fileset From Wins    Builds a new fileset containing all
  694.                                 currently open windows.
  695.             Open Entire Fileset            Opens all files in a specified fileset.
  696.             
  697.             Create Think Fileset Create a fileset containing the source files
  698.                                 of the current Symantec project.
  699.             Create Warrior Fileset Create a fileset containing the source files
  700.                                 of the current CodeWarrior project.
  701.  
  702.             Find Tag            Find a function definition.
  703.             Create Tag File        Create a "tag" file specifying where functions
  704.                                 are defined.
  705.  
  706.             Replace In Fileset    Global search-and-replace through a fileset. Does
  707.                                 not update open windows unless told to.
  708.                                 
  709.             Rebuild Fileset Menu    Rebuilds the menu. Filesets created with 
  710.                                 globbing (all except the Symantec and 
  711.                                 CodeWarrior filesets) are re-globbed and 
  712.                                 reflect changes in the directories.
  713.                                 
  714.     
  715.           Menus, User-Defined 
  716.  
  717. All of Alpha's menus are defined in the initialization files that Alpha 
  718. loads on startup.  They can be altered or discarded at well.  Alpha's menu 
  719. commands allow the the user to build custom menus which contain names of 
  720. functions, macros, or arbitary TCL commands that just HAVE to be in the 
  721. menus, as opposed to being merely callable through the bindings.  The 
  722. syntax is dead simple.  Menus can be nested, allowing heirachical menus to 
  723. be defined.  See the 'alphaBits.tcl' file for examples (only the first 
  724. three Alpha menus are hard-coded into the Application, the others are set 
  725. up through the alphaBits.tcl file).  The following meta characters can be 
  726. embedded in the strings:
  727.  
  728.    Meta-character     Usage
  729.    --------------     -----
  730.  
  731.     ; or Return       Separates multiple items.
  732.     ^                 Followed by an icon number, adds 
  733.                       that icon to the item.
  734.     !                 Followed by a character, marks the
  735.                       item with that character.
  736.     <                 Followed by B, I, U, O, E, or S,  
  737.                       sets the character style of the item.
  738.     /                 Followed by a character, sets up
  739.                       a keyboard equivalent.
  740.     (                 Disables the item.
  741.  
  742.  
  743. The following modifiers can be used to require other combinations of modifiers
  744. than just the command key. Control-option, for instance, is specified by 
  745. putting the string "<B<I" in the menu item. The menu symbol for shift is 
  746. an upward outline arrow, control is the outlined ^ symbol ("Files:Close All"
  747. has one), and option is the wavy line with the dot in the upper right 
  748. ("Wins:Iconify" has one). The following are characters that can follow 
  749. the '<' and what they signify.
  750.  
  751.     B        - control key required
  752.     I        - option key required
  753.     U        - shift key required (only for alpha-numerics!)
  754.     O        - command key required
  755.     S        - isDynamicItem is part of dynamic item.
  756.     E        - forces item to start new dynamic item.
  757.  
  758.  
  759. Please ignore the following:
  760.  
  761.     a    Enter            n    F10
  762.     b    Return            o    F11
  763.     c    Tab                p    F12    
  764.     d    Num Lock        q    F13
  765.     e    F1                r    F14
  766.     f    F2                s    F15
  767.     g    F3                t    Help
  768.     h    F4                u    Del
  769.     i    F5                v    Forward Del
  770.     j    F6                w    Home
  771.     k    F7                x    End
  772.     l    F8                y    Page Up
  773.     m    F9                z    Page Down
  774.     
  775.     128    Up                130    Left
  776.     129    Down            131    Right
  777.     
  778.  
  779.  
  780. The menu creation syntax is :
  781.  
  782.     menu [-s] <-n name> <-i num> [-p procName] [-m] "Tcl list of items"
  783.  
  784. Where the arguments have the followings meanings:
  785.   '-s'            Use system menu definition proc (faster).
  786.   '-i <num>'    Resource id of icon suite to use for menu title.
  787.   '-n <name>'    Name of menu.
  788.   '-m'            No menu form. If not supplied, each menu item is split into 
  789.                   words at each capitalized letter.
  790.   '-p <pname>'     Rather that having alpha call a Tcl proc named by the menu 
  791.                   item's text, this option tells Alpha to call the tcl proc 
  792.                   named by 'pname' with two arguments: the menu name, and the
  793.                   text of the menu item chosen.
  794.   '-M <mode>'    Bindings only take effect in specified mode.
  795.   
  796. Once the menus are created, they can be inserted and  deleted from the 
  797. menu bar by the syntax:
  798.  
  799.    insertMenu "name"
  800.    removeMenu "name"
  801.  
  802. as well as through macros.
  803.  
  804.  
  805. As alluded to above, Alpha attempts to make procedure names readable in the 
  806. menus by separating words at any capitalized letter. For example, 
  807. 'findFile' becomes "Find File". This function is turned off by the '-m' 
  808. option. 
  809.  
  810. Menu items can be enabled and disabled through the TCL command 
  811. 'enableMenuItem'. Menu items checkmarks can be turned on and off via 
  812. 'markMenuItem'. Menu items can be appended via 'addMenuItem' and deleted 
  813. via 'deleteMenuItem'. See the "Alpha Commands" help file for syntax. 
  814.  
  815. As explained above, the Mac ToolBox uses various keys to specify text 
  816. style and key equivalents. Sometimes you may want these characters 
  817. included in your text literally. If an ampersand ('&') is the last 
  818. character in a menu item, Alpha coerces the string so that these special 
  819. characters are not interpreted.
  820.  
  821. If an ellipsis ('ノ') is the last character in a menu item (except possible 
  822. for the above ampersand), it is stripped off before searching for the 
  823. function corresponding to the chosen item.
  824.  
  825.  
  826. #================================================================================
  827. # Just for the heck of it, the following is a script that I put in my 
  828. # prefs.tcl file. It creates a menu for all the .tex files in my 
  829. # thesis directory, minus the dirname and .tex extension.
  830. #
  831. set THESIS "Internal:Textures:thesis"
  832. proc thesisMenuProc {menu item} {
  833.     global THESIS
  834.     edit -r -m $THESIS:$item.tex
  835. }
  836.  
  837. set files ""
  838. foreach f [glob $THESIS:*.tex] {
  839.     lappend files [file rootname [file tail $f]]
  840. }
  841. menu -n Thesis -m -p thesisMenuProc $files
  842. unset files
  843. #================================================================================
  844.  
  845.  
  846.  
  847.           TCL
  848.  
  849. See the Tcl manual page under the 'Help' menu for a complete description of 
  850. Tcl, the Tcl shell, and its commands.  Each of the Tcl commands and 
  851. several sections have a mark defined, so you can use the "Mark" menu to 
  852. navigate through the manual page.  
  853.  
  854.  
  855.  
  856.           Key Bindings
  857.  
  858. Any TCL command can be bound to any single keystroke. One way to bind a 
  859. function is with a statement such as:
  860.   
  861.       bind 'c' <modifier string> funcName [<mode>]
  862.           
  863. where c is a character, <modifier string> is an optional string containing 
  864. one or more of:
  865.  
  866.       c   - command modifier
  867.       o   - option modifier
  868.       s   - shift modifier
  869.       z   - control modifier
  870.       e   - escape modifier      
  871.  
  872. Additionally, the modifier string can contain a capital letter specifying 
  873. that the binding is only activated if preceded by control and the lowercase 
  874. version of that letter. This feature allows multiple-key combinations ala 
  875. Emacs. The following line binds cmd-shift-f to the function 'forwardChar': 
  876.  
  877.  bind 'f' <cs> forwardChar 
  878.  
  879. The next line would bind the same function to C-x C-f, assuming that 
  880. control-x is bound to the function 'prefixChar': 
  881.  
  882.  bind 'f' <cX> forwardChar 
  883.  
  884. 'mode' is an optional parameter that specifies, when present, that the 
  885. binding is only active in a given mode, where the current mode is the 
  886. parameter to the last call of 'displayMode' (look in "procs.tcl"). Note 
  887. that given a general binding (no mode specification) and a binding specific 
  888. to the current mode, the last binding to have been created is the one found 
  889. first. 
  890.  
  891. Additionally, most keyboards have keypads and/or Function Keys. These 
  892. keys can be bound using case-insensitive numeric labels using the same 
  893. bind command as above, with the label replacing the character. For 
  894. example, to bind F1 to function 'funcName', the following would work:
  895.  
  896.     bind F1 funcName
  897.  
  898. As above, the binding can include a modifier string. The following labels 
  899. are defined for US keyboards:
  900.  
  901.   Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 Help Home Pgup Del 
  902.   End Pgdn Left Right Up Down Clear Kpad0 Kpad1 Kpad2 Kpad3 Kpad4 Kpad5
  903.   Kpad6 Kpad7 Kpad8 Kpad9 Kpad= Kpad/ Kpad* Kpad- Kpad+ Enter Kpad.
  904.  
  905. The function 'listBindings' will list all of the bindings currently in 
  906. effect in a format suitable for re-loading.
  907.  
  908. The above labels may not be sufficient for all keyboards (attention 
  909. international users). If a hex number is used instead of a character inside 
  910. the single quotes, the binding is done to key codes instead of ascii 
  911. values. The following is a key code version of the same binding: 
  912.  
  913.       bind 0x03 <cs> forwardChar
  914.  
  915. The key code for any given key can be obtained by using the 'keyCode' 
  916. function. 
  917.  
  918. Also, there is an alternate form that allows the specification of an 
  919. ascii code directly:
  920.  
  921.     ascii 0x20 <z> setMark
  922.     
  923. Binds control-space to 'setMark'.
  924.  
  925. Note that menu item command equivalents take precedence over bindings, 
  926. and that the 'bind' command does not affect the command equivalents 
  927. displayed in the menus. Command equivalents can only be changed by using
  928. an external tool like 'ResEdit'. Also note that key code bindings take 
  929. precedence over ascii bindings. 
  930.  
  931. Finally, there are 'unbind' and 'unascii' functions, with identical 
  932. arguments to their counterparts. 
  933.  
  934. <Shf Ctl> and <Shf Opt Cmd> have been reserved for user-defined
  935. keybindings.
  936.  
  937.  
  938.           Undo + Redo
  939.  
  940. ALPHA supports unlimited undo and redo. This means that most changes can 
  941. be undone, and then redone, at will. Bear in mind that once you create new 
  942. modifications, all changes that you have undone but not redone are lost. 
  943. Another point to bear in mind is that saving a buffer to disk currently 
  944. flushes the undo buffer. 
  945.  
  946.  
  947.           Event Hooks
  948.  
  949. Alpha calls the TCL procs "openHook", "saveHook", "saveasHook", "closeHook", 
  950. "activateHook", "deactivateHook", "suspendHook", "dirtyHook", "quitHook"
  951. and "resumeHook" when the corresponding events occur. With the exception 
  952. of "saveasHook", the proc are all called with the complete pathname as the 
  953. sole argument. "saveasHook" is called with the old pathname as the first 
  954. argument and the new pathname as the second argument. Default 
  955. implementations for these commands are in the file 'modes.tcl'. These 
  956. commands can be modified to perform arbitrary commands, including saving of 
  957. files, backups, implementations of per-window variables, etc.
  958.  
  959.           Tags
  960.  
  961. ALPHA supports the use of tags to find declarations of functions; by 
  962. default this is set up only for 'C'.  When searching for a tag, ALPHA looks 
  963. for the tag file specified by the "tagFile" string variable.  ALPHA's tag 
  964. generating routines use the regular expression in the string variable 
  965. "funcExpr" to look for function declarations.  In other words, we don't 
  966. parse the text.  If you declare your functions differently, you can change 
  967. " funcExpr" to suit your own style.  Alpha currently uses the following 
  968. regular expression to find C function declarations:
  969.  
  970.               ^[^ ¥t#¥r/@][^¥r]*¥([^¥r]*¥)$
  971.  
  972. (NOTE: the above expressions won't pick up many C++ method definitions. To 
  973. pick them up, add a question mark '?' after the last right parenthesis.) 
  974. Although complicated, this expression makes sense if you slowly wade 
  975. through it. The string that we are looking for must take up an entire 
  976. line. It must begin with a character other than '¥t', '#', '¥r', '/', ' ', 
  977. or '@'. There must be a set of parenthesis.   
  978.  
  979. Note that not only can you customize this to your style of 'C' 
  980. declarations, you could also use it to generate tags for other languages. 
  981. The only thing you need to bear in mind is that the tag routines use the 
  982. complete word previous to the first '(' in the selected line as the 
  983. function's name. If there is no '(' in the selected line, the last word in 
  984. the line is used. Therefore, Pascal procedures w/ or w/o parameters can be 
  985. identified.
  986.  
  987. Caveat: Apple's list manager can't handle more than 32k of text in the 
  988. entire list, so there is a practical limit of 2000 or so tags in your 
  989. project.
  990.  
  991.  
  992.           Backups
  993.  
  994. If the 'backup' variable is set in preferences files, or from the 
  995. Utils:Flags menu, Alpha backs up each file before saving new 
  996. modifications. By default, the backup file is in the same directory, and 
  997. its name is formed by suffixing a tilde to the name of the saved file. 
  998. Backups are actually performed in the 'saveHook' proc (see above), in the 
  999. file procs.tcl. The Tcl variables 'backDir' and 'backExtension' can be 
  1000. used to modify this behavior.
  1001.  
  1002.  
  1003.           Fill Routines
  1004.  
  1005. The "fill" and "wrap" routines reformat text to specified line lengths. 
  1006. This is useful in two case. First, word processors such as Microsoft Word 
  1007. only insert carriage returns at the end of paragraphs. Secondly, while 
  1008. typing and inserting text into pre-existing paragraphs, the line lengths 
  1009. become unequal. 
  1010.  
  1011. The "wrap" routine handles word processor documents quickly by merely 
  1012. inserting carriage returns as necessary to ensure all lines in the 
  1013. selected region are shorter than specified by the variable 'fillColumn'. 
  1014. Alpha asks the user if wrapping should be done whenever the user opens 
  1015. files that have lines longer than 'paraColumn' characters. This feature 
  1016. can be defeated by including the word 'nowrap' anywhere on the first line.
  1017.  
  1018. The TCL routines 'fillRegion' and 'fillParagraph' go further. Not only do 
  1019. they break lines, but they also coalesce lines to eliminate short lines. 
  1020. Both routines work by stripping the relevent text of white space, then 
  1021. re-inserting white space and carriage returns so that no line extends past 
  1022. 'fillColumn' characters in length and begins with 'leftFillColumn' spaces 
  1023. characters. Both routines are implemented in the file 'procs.tcl', and 
  1024. therefore different definitions of paragraphs can be accomodated by 
  1025. modifying the appropriate TCL procedures.
  1026.  
  1027.  
  1028.           Soft Text Wrapping
  1029.           
  1030. "Soft" text wrapping is re-formatting the rest of the paragraph on-the-fly 
  1031. as text is inserted and deleted.  Soft-wrapping is enabled by selecting 
  1032. "Toggle Soft Wrap" in the windows menu (or by hitting F10) for any mode that 
  1033. enables the variable 'wrapText'.  By default, 'wrapText' is enabled in the 
  1034. Text and TeX modes.  The text to be wrapped is delimited by the current 
  1035. line and the last line in the current paragraph.  Wrapping occurs after 
  1036. insertions that result in the current line becoming longer than 'wrapHigh' 
  1037. characters long (tabs counted as one character), or deletions where the 
  1038. length of the line (tabs likewise) becomes less than 'wrapLow' characters 
  1039. long.
  1040.  
  1041.  
  1042.           Word Breaking
  1043.  
  1044. Alpha allows you to redefine its internal notion of what a word is, 
  1045. through the variables 'wordBreak', and 'wordBreakPreface'. 'wordBreak' is 
  1046. set to a regular expression that defines a word to you. 'wordBreakPreface' 
  1047. should be a regular expression that matches exactly one of any characters 
  1048. that are not in your word definition. 
  1049.  
  1050. For instance, the default definition of 'wordBreak' is '[a-zA-Z0-9_]+'. 
  1051. This matches any contiguous sequence of contiguous alphanumeric 
  1052. characters, plus underscore.
  1053.  
  1054. The default value for wordBreakPreface is '[^a-zA-Z0-9_]', basically just 
  1055. the negation of any any of the characters in your 'wordBreak' definition. 
  1056.  
  1057. The need for both these variables in backward searches can be seen as 
  1058. follows. Suppose your window's text is "hey hello", and the current 
  1059. insertion is between the two 'l's. Now, searching backwards for the above 
  1060. 'wordBreak' definition will take the insertion to between the 'e' and the 
  1061. first 'l', not really where we want to say is the start of the word. By 
  1062. contrast, if we search backwards for 'wordBreak' and 'wordBreakPreface' 
  1063. concatenated together, and then move forward one character after a 
  1064. successful search, we end up right before the 'h' in 'hello', just where 
  1065. we want to be.
  1066.  
  1067.  
  1068.           File Sets
  1069.  
  1070. File Sets are lists of files that Alpha uses for multiple-file searches and 
  1071. tag searches, among other things.  Typically, a user will set up several 
  1072. different file sets, perhaps one specifying all the source files in a 
  1073. project, another specifying all the Mac include files, and another 
  1074. specifying all the UNIX include files.  When a command using file sets is 
  1075. initiated, Alpha evaluates the command "getCurrFileSet", which returns a 
  1076. list of complete pathnames to search.
  1077.  
  1078. Functions that use file sets operate on the "current" fileset, which is 
  1079. specified by the 'currFileSet' variable.  The current file set can also be 
  1080. switched by using the "File Set" hierarchical menu.  There is also a flag 
  1081. 'Auto Adjust Fileset' which will switch filesets whenever the fileset menu 
  1082. is used to open a file.
  1083.  
  1084. Selecting any item from the fileset menu opens that file.  If the flag 
  1085. 'Include Non Text Files' is set, the fileset menu may contain files Alpha 
  1086. is not designed to open; these are sent to the Finder which will open them 
  1087. using whichever application created them.  A common use of this feature is 
  1088. a hierarchical fileset containing a complete C or C++ project.  Selecting any 
  1089. project source file will open that file for editing, and selecting the 
  1090. project file/debugging symbol file/... will open that using appropriate 
  1091. tool (Symantec Project Manager or Codewarrior IDE or Debugger,ノ)
  1092.  
  1093. AlphaLite has no fileset utilities menu, allowing just for the creation and 
  1094. deletion of filesets.
  1095.  
  1096. Fileset Utilities
  1097. =================
  1098.  
  1099. The fileset utilities menu contains the following items:
  1100.  
  1101. NewFilesetノ          -- create a new fileset of one of the following 
  1102.                         six standard types (others may be added by
  1103.                         writing your own Tcl code. see "filesets.tcl"
  1104.                         and "latexFilesets.tcl" for details):
  1105.                             Codewarrior 
  1106.                             FromDirectory 
  1107.                             FromHierarchy 
  1108.                             FromOpenWindows 
  1109.                             Tex 
  1110.                             Think 
  1111.  
  1112. DeleteFilesetノ          -- remove a fileset, permanently if desired.
  1113. Choose                  -- a hierarchical menu from which to set the 
  1114.                         current project.
  1115. UpdateCurrentFileset -- re-build a fileset from scratch
  1116. RebuildAllFilesets      -- total menu rebuild.
  1117. ZapAndBuildFilesets  -- (hold down option) a more drastic version of the above
  1118. FindTag              -- see 'Tags' for information on this and the 
  1119.                         following item.
  1120. CreateTagFile 
  1121.  
  1122.  
  1123. HideFileset          -- if you have many filesets, some of which are only 
  1124.                         used for searching purposes, you can remove them 
  1125.                         from the menu.
  1126. BrowseFilesetノ          -- opens a window containing all fileset items, 
  1127.                         from which any can be opened.
  1128. CloseEntireFilesetノ  -- close all windows which belong to a given fileset.
  1129. FilesetToAlphaノ         -- convert all text files in a fileset to Alpha's creator.
  1130. OpenEntireFilesetノ      -- open all files in a fileset
  1131. OpenFilesetFolderノ      -- tells the Finder to open the base folder which 
  1132.                         contains a fileset.
  1133. RenameFilesetノ          -- change a fileset's name
  1134. ReplaceInFilesetノ      -- global search and replace in all files. Use this 
  1135.                         item with care!
  1136. StuffFilesetノ           -- If you have 'DropStuff' installed, you can archive a 
  1137.                         fileset.
  1138. WordCount              -- Count all words in a fileset 
  1139. WordCountFast          -- A quicker version which seems to have a memory leak!
  1140.  
  1141. The following flags may be set:
  1142.  
  1143. AutoAdjustFileset    -- opening a file from the menu will adjust 'currFileSet'
  1144. IncludeNonTextFiles  -- files not of type 'TEXT' may be in the menu.
  1145. IndentFilesetItems   -- visually format submenus if appropriate.
  1146. SortFilesetItems     -- force alphabetical ordering for all filesets
  1147. SortFilesetsByType   -- structure the fileset menu in a user-defined, type-
  1148.                         dependent fashion; see Personalisation.
  1149.  
  1150. Fileset Types
  1151. =============
  1152.  
  1153. 'From Directory'     -- The basic type: create a fileset of all files in a
  1154.                         given directory which match a given pattern.
  1155.                         
  1156. 'From Hierarchy'     -- Takes the above one step further and allows filesets
  1157.                         to include all files in a nested set of folders.
  1158.                         
  1159. 'From Open Windows'  -- Make a fileset containing all currently open windows.
  1160.  
  1161. 'Codewarrior'         -- Query the Codewarrior IDE for a list of all files in
  1162.                         the current project.
  1163.                         
  1164. 'Think'                 -- Query the Symantec Project Manager for a list of all
  1165.                         files in the current project.
  1166.  
  1167. 'Tex'                 -- Make a fileset of all parts of a multi-part TeX/LaTeX
  1168.                         document.  Alpha's LaTeX mode understands these and
  1169.                         will automatically send your TeX application the base
  1170.                         .tex/.ltx file when you select 'Typeset' on any 
  1171.                         component part.
  1172.                         
  1173. The following items will be added to the utilities menu if you use 
  1174. TeX filesets:
  1175.  
  1176. ExtractEpsBoxSizes   -- search all document parts for included eps graphics,  
  1177.                         extract bounding box information from the .eps files 
  1178.                         and insert it explicitly into the document (can lead 
  1179.                         to much quicker typesetting).
  1180. DeleteEpsBoxSizes    -- remove all the above bounding box information
  1181. HierarchicalBibFiles -- bibliography files may ¥input others, so they should
  1182.                         be searched (the default is not to do this, because
  1183.                         .bib files may be enormous).
  1184.  
  1185. Personalisation
  1186. ===============
  1187.  
  1188. As well as adjusting the aforementioned flags, the fileset menu allows 
  1189. complete user control of the structure of the menu in the following way: 
  1190. Set the 'Sort Filesets By Type' flag, and set the variable 
  1191. "filesetSortOrder" as follows:
  1192.  
  1193.    The structure of    this variable dictates how the fileset
  1194.    menu    is structured:
  1195.        
  1196.        '{pattern p}' 
  1197.            lists all filesets which    match 'p'
  1198.        '-' 
  1199.            adds    a separator    line
  1200.        '{list of types}' 
  1201.            lists all filesets of those types.
  1202.        '{submenu name sub-order-list}' 
  1203.            adds    a submenu with name    'name' and recursively
  1204.            adds    filesets to    that submenu as    given by the 
  1205.            sub-order.
  1206.            
  1207.    Leading,    trailing and double    separators are automatically
  1208.    removed.
  1209.  
  1210. For example, the default value of this variable (more as an example than 
  1211. anything else) is:
  1212.  
  1213. set filesetSortOrder { {pattern System} {pattern User} {pattern Preferences} ¥
  1214.                         - {tex} - {pattern *.cc} ¥
  1215.                         {submenu Headers {pattern *.h}} ¥
  1216.                         - {fromDirectory think codewarrior ¥
  1217.                         fromOpenWindows fromHierarchy} * } 
  1218.  
  1219. You can and should over-ride this in your "prefs.tcl" file (copy and paste 
  1220. from here, then make your changes).
  1221.  
  1222.  
  1223.           Macros, Keyboard
  1224.  
  1225. Defining and Using Keyboard Macros ALPHA supports keyboard macros which 
  1226. record a sequence of keystrokes to be played back later w/ the function 
  1227. 'executeKeyboardMacro' (this function is also in the 'Utilities' menu) or 
  1228. written into a buffer by selecting 'Dump Macro' from the 'Utilities' menu. 
  1229. The dump function prompts you for a macro name, which must consist only of 
  1230. letters of the alphabet, digits, and '_'. 
  1231.  
  1232. These macro declarations can then be edited, loaded, and bound to 
  1233. keystrokes.  Loading a macro or a binding is accomplished by hiliting the 
  1234. text and selecting the "Load" item of the 'Edit' menu.  If no text is 
  1235. hilited, the entire window is loaded by the same command.  Macros can be 
  1236. bound to keys in exactly the same manner as functions (see above).
  1237.  
  1238.  
  1239.           THINK and Alpha
  1240.  
  1241. Yes! Finally Think has support for external editors (7.0 or better).  To 
  1242. make this work, put an alias of Alpha in the "Tools" subdirectory of the 
  1243. directory the project manager is in, and name the alias "Editor".  
  1244. Secondly, check the "Use External Editor" button in the project manager's 
  1245. option dialog.  You do not have to check the "Always Check File Dates" 
  1246. button.
  1247.  
  1248. Any open window events will now be vectored to Alpha, and from within 
  1249. Alpha you can initiate compiles, disassembles, makes, etc. Errors are 
  1250. reported back to Alpha.
  1251.  
  1252. Look in :Tcl:SystemCode:"think.tcl" for the code controlling much of the 
  1253. interactions between THINK and Alpha.  If you improve anything, please send 
  1254. it back to me.
  1255.  
  1256. If a window contains a file that is part of the a project that is 
  1257. currently open in the Think Project Manager, selecting "Open Header" from 
  1258. the Think menu will put up a list of include files. The same files can be 
  1259. accessed by option-clicking on the window's title-bar.
  1260.  
  1261. A fileset consisting of the source to a think project can be created 
  1262. through the "File:File Sets" menu.
  1263.  
  1264.  
  1265.           Rectangular Editing
  1266.  
  1267. If the option key is pressed while the mouse is dragged,  a rectangular 
  1268. section of text is selected instead of the normal selection. This 
  1269. rectangular selection may extend over multiple lines, but contains only 
  1270. text between the column of the drag start and the column of the drag end. 
  1271. The drag cannot end on a column or row less than the start. This selection 
  1272. can be extended by option-shift-mouse, but not dragged further.
  1273.  
  1274. The rectangular selection can be deleted, copied, and pasted. This is very 
  1275. useful for tables and arrays, such as in LaTeX. Usually, the operation 
  1276. will be intuitive. However, if you use proportional fonts the selection 
  1277. may appear ragged. If some of the line contain tabs, the result may not be 
  1278. want you want. Converting tabs to spaces in the desired region before 
  1279. attempting rectangular selection usually fixes the problems. 
  1280.  
  1281. The most natural semantics of rectangular selection aren't obvious. I 
  1282. chose to implement it in a similar fashion to that of Microsoft Word. 
  1283. Preditor does it in another way, and has many bugs (and it's  commercial, 
  1284. hah!).
  1285.  
  1286.  
  1287.  
  1288.           LaTeX
  1289.  
  1290. See the "LaTeX Help" file under the help menu.
  1291.  
  1292.  
  1293.  
  1294.  
  1295.           System Software 7.0
  1296.  
  1297. Alpha is 32-bit clean and high-level event aware. 
  1298.  
  1299. Under 7.0, Alpha uses temporary memory to accommodate large files. This 
  1300. allows you to open multi-megabyte files even when Alpha's partition is set 
  1301. only at 512k, if the system has that much memory available. Note that 
  1302. using temporary memory makes that much memory unavailable to other 
  1303. applications. Contrary to all admonishments, Alpha does not unlock 
  1304. temporary memory across WaitNextEvent calls and may eventually use all the 
  1305. memory in your system. You can turn this feature off through 'tempMem'.
  1306.  
  1307. Note, however, that the clipboard is allocated by the system in Alpha's 
  1308. heap, and therefore cannot take advantage of temporary memory.
  1309.  
  1310.  
  1311.  
  1312.  
  1313.           Apple Events
  1314.  
  1315. See the Help file on AppleEvents.
  1316.  
  1317.  
  1318.           MPW
  1319.  
  1320. Alpha's 'dosc' capability (see the function "dosc") can be used to send 
  1321. events to MPW's ToolServer. Using about ten lines of C code and the ~40 
  1322. lines of Tcl code in 'mpw.tcl', I created a pseudo mpw shell (look under 
  1323. the "Misc" menu). This shell uses Alpha's 'dosc' function to package each 
  1324. shell command up into an Apple Event and send it to the ToolServer, which 
  1325. then evaluates the command and returns the result to be displayed in the 
  1326. shell. I'm rather new to Apple Events and the ToolServer, so there are 
  1327. probably a few rough edges. 
  1328.  
  1329. If anyone has extensive docs for ToolServer I'd appreciate looking at them. 
  1330. I only have the application because I am a beta tester for another product 
  1331. that supports ToolServer. I was given the application for the beta testing, 
  1332. but not any docs. And of course, I can *not* give away copies of 
  1333. ToolServer because it is a licensed Apple product.
  1334.  
  1335. Finally, Tom Moertel (thor@vivaldi.psu.edu) has written and provided a set 
  1336. of tools that make life easier while writing code in Alpha for the MPW 
  1337. environment. The tools make extensive use of Apple Events, so you must be 
  1338. using MPW 3.3a or greater. (Earlier versions cannot receive commands via 
  1339. Apple Events.) 
  1340.  
  1341.   With the MPW-Alpha package you can:
  1342.   
  1343.     o  Send TCL commands to Alpha from MPW
  1344.     o  Use MPW 411 from Alpha for instant access to programming help
  1345.     o  Automagically locate source code errors from your last MPW compile
  1346.     o  Use the MPW CDent tool to reformat (grind) C/C++ source code
  1347.        from within Alpha
  1348.  
  1349. This package is available via anonymous ftp from cs.umd.edu.
  1350.  
  1351.  
  1352.           File Formats
  1353.  
  1354. Alpha reads and writes files stored in three (or maybe four) different 
  1355. formats. The three main formats are mac (lines end with a carriage 
  1356. return), unix (lines end with linefeed), and IBM pc (lines end with both 
  1357. carriage return and linefeed. Typical, isn't it?).
  1358.  
  1359. Alpha will transparently read and write all three of these formats. You 
  1360. don't have to do anything special to use different formats, but the 
  1361. 'SaveAs...' dialog allows you to specify the format that a file is written 
  1362. in through the 'Format' button.
  1363.  
  1364. The fourth file format is just a modification of the ordinary mac format. 
  1365. Word processors such as Microsoft Word and MacWrite only put carriage 
  1366. returns at the end of paragraphs, so that they can wrap  the paragraphs on 
  1367. the fly. This is what is referred to as 'paragraph format' in the rest of 
  1368. the help text. Alpha does not transparently convert to and from this 
  1369. format because there are valid reasons why someone might want to edit a 
  1370. paragraph formatted file while not in paragraph mode. 
  1371.  
  1372. Therefore, when Alpha detects reads a paragraph-mode file, it asks the 
  1373. user whether or not to remap it. Files can be mapped back to paragraph 
  1374. mode by setting 'fillColumn' to a very large number and executing 
  1375. 'fillRegion' on the text.
  1376.  
  1377.           Printing
  1378.  
  1379. Version 6.0 and above have many printing options available. Printing is 
  1380. accomplished via a submenu under the File menu. The menus allows printing 
  1381. either via Alpha or several other applications.
  1382.  
  1383. If printing through alpha, the variables 'printHeader', 'printHeaderTime', 
  1384. and 'printHeaderFullPath' control whether and what type of header is 
  1385. printed at the top of each page. These flags are actually used in the procs 
  1386. 'printLeftHeader' and 'printRightHeader' (in procs.tcl) to create the 
  1387. string that appears on the left side of the top of the page. 'leftMargin', 
  1388. 'topMargin', and 'bottomMargin' control margins on the printed page.
  1389.  
  1390. 'printerFont' and 'printerFontSize' allows the size and type of the 
  1391. printed font to be specified.
  1392.  
  1393. The external apps that Alpha is currently configured to use are 
  1394. "Enscriptor", an app that allows multi-column and other options, "Kodex", 
  1395. a "C" pretty printer, and "Drop・PS", which prints postscript files. All 
  1396. options operate on the frontmost window. These applications are not 
  1397. supplied w/ Alpha, but can be downloaded from any comprehensive mac site. 
  1398. They can also be downloaded from Alpha's home site. "Enscriptor" and 
  1399. "Kodex" are shareware apps written by John Cho. "Drop・PS" is a freeware 
  1400. app written by some evil commercial text editor guru :-).
  1401.  
  1402.  
  1403.           Random Tips
  1404.  
  1405. - When a window is "dirty" (has unsaved changes), a
  1406.   red disk icon appears just below the titlebar in the
  1407.   upper right corner of the window, and a diamond 
  1408.   appears next to the corresponding item in the Windows
  1409.   menu. 
  1410.  
  1411. - All dialogs that have editable text can use the Cut, 
  1412.   Copy, and Paste menu command equivalents.
  1413.  
  1414. - In all dialogs, non-editable controls can be selected 
  1415.   by typing Command-<first char of control>. If there 
  1416.   are no editable controls in the dialog, simply typing 
  1417.   the first letter of the desired control suffices. PgUp,
  1418.   PgDown, Home, and End keys now work for most list dialogs.
  1419.  
  1420. - Set the flag 'undoOn' to 0 in order to speed up long 
  1421.   replace-all and macro modifications.
  1422.  
  1423. - After a piece of text has been yank'd or paste'd, the 
  1424.   'mark' is set to the beginning of the new text and the
  1425.   selection is at the end. 'markHilite' will now hilite 
  1426.   the entire insertion. This is especially useful when
  1427.   moving code. Cut the code, insert at a new position,
  1428.   select the inserted text by selecting "Edit:Hilite", and 
  1429.   then use "Edit:Shift Left" and "Edit: Shift Right" to move
  1430.   the text to the proper indentation.
  1431.  
  1432. - Most help files have marks in them, which let you quickly
  1433.   navigate to places of interest. You can access these marks
  1434.   by command-clicking on the title-bar or on the "{}" icon
  1435.   above the vertical scrollbar.
  1436.  
  1437.  
  1438.  
  1439.           Variables 
  1440.  
  1441. There are two different kinds of variables in the Alpha world: global 
  1442. vars and mode vars. Mode vars can have different values in each mode, and 
  1443. are modified by the "Mode Vars" popup menu over the checkmark just 
  1444. above vertical scrollbar. Changing one of these variables changes the 
  1445. variable's value for all windows of the current mode.
  1446.  
  1447. Global variables are accessed via the "Config:Flags" and "Config:Vars" menus. 
  1448. Changing one of these variables affects all windows.
  1449.  
  1450. Alpha records which variables are modified in the course of a session and 
  1451. prompts the user to save them prior to quitting.
  1452.  
  1453.  
  1454. Mode Vars
  1455.  
  1456. autoMark       ・ Automatically mark windows on open if they don't have marks.
  1457. doubleSpaces   ・ If true, fill routines end all sentences w/ double spaces.
  1458. elecLBrace     ・ Electric 'C' left brace on.
  1459. elecRBrace     ・ Electric 'C' right brace on.
  1460. electricSemi   ・ Electric 'C' semicolon on.
  1461. fillColumn     ・ Number of columns use as limit for
  1462.                  "fill" routines. See 'leftFillColumn'
  1463. funcExpr       ・ Set to the regular expression that 
  1464.                  ALPHA uses to find function 
  1465.                  declarations.
  1466. leftFillColumn ・ Number of blanks left at beginning of 
  1467.                  lines by 'fill' routines. 
  1468. parseExpr      ・ Set to the regular expression used by parseFuncsAlpha to 
  1469.                  extract the name of a function from the text returned by a
  1470.                  search for funcExpr.
  1471. wordBreak       ・ Regular expression used to defines words for all internal 
  1472.                  operations. 
  1473. wordBreakPreface ・ Prepended to 'wordBreak' when looking backwards for a 
  1474.                  word. See the "Word Break" section of this file for more 
  1475.                  information.
  1476. wordWrap       ・ if true, lines exceeding 'fillColumn'
  1477.                  in length are automatically wrapped
  1478.                  during normal text insertion (typing)
  1479. wrapBreak       ・ Reg expr used for automatic word wrapping.
  1480. wrapBreakPreface ・ Reg expr used for automatic word wrapping.
  1481.  
  1482. Global Vars
  1483. autoHScroll       ・ Automatically scroll horizontal scrollbar
  1484.                  to follow insertion.
  1485. autoSave       ・ If TRUE, buffers (except untitled buffers) are automatically
  1486.                  saved every 'changesLim' changes.
  1487. backDir           ・ Directory in which to store backup files.
  1488. backExtension  ・ Suffix to append to backup files.
  1489. backup         ・ if TRUE, the default Tcl proc 'saveHook' makes a backup 
  1490.                  of a file before the data is written. The default backup
  1491.                  scheme has extension "~".
  1492. blinkCursor    ・ Cursor blinks
  1493. blockCursor    ・ if true, Alpha uses a block cursor instead of a vertical 
  1494.                  line. 
  1495. bottomMargin   ・ Bottom print margin.
  1496. bwWindows      ・ if true, Alpha will use 1-bit windows
  1497.                  even if color is available. This speeds
  1498.                  refresh quite a bit on slow color 
  1499.                  machines such as the IIsi.
  1500. changesLim     ・ number of changes to a window before 
  1501.                  garbage collection or autosave is done.
  1502. coloring       ・ enable keyword coloring.
  1503. def{Height,Left,Top,Width} ・ If 'fullScreen' set, default size
  1504.                  of windows.
  1505. defaultFont    ・ font to use on new windows and files 
  1506.                  which don't have associated font 
  1507.                  specification resources.
  1508. diffFlags       ・ Command line args to pass to GNU diff.
  1509. dragAndDrop       ・ Enable drag and drop.
  1510. fontSize       ・ Default size of fonts used to display 
  1511.                  files.
  1512. forceMainScreen・ If true, forces windows to main screen. Useful if you 
  1513.                  have a small screen and windows habitually are too large.
  1514. fullNames      ・ Windows display pathnames instead of 
  1515.                  mere file names.
  1516. fullScreen     ・ If on, all windows are start in the 
  1517.                  same place, and have the dimension 
  1518.                  specified by 'defHeight' and 
  1519.                  'defWidth'.
  1520. horScrollBar   ・ If set, use horizontal scrollbar.
  1521. iconifyOnSwitch・ Iconify all windows when suspending.
  1522. indentOnCR     ・ Auto-indent on carriage return.
  1523. infoWindowsDirty・ Dirty/Clean state of description windows.
  1524. intelCutPaste  ・ Enable intelligent cut and paste.
  1525. lockStatus       ・ Disable status window dragging.
  1526. maskCapsLock   ・ Mask caps lock bit on key depresses.
  1527. moveInsertion  ・ if true, 'pageBack' and 'pageForward'
  1528.                  move the insertion point
  1529. numWinsToTile  ・ specifies the number of windows tile
  1530.                  commands should affect.
  1531. paraColumn     ・ Alpha automatically wraps files
  1532.                 that contains lines longer than this. 
  1533. posActivate    ・ If true, then merely moving the mouse
  1534.                  over a window activates. For those
  1535.                  X11-twm lovers.
  1536. powerThumb       ・ If true, vertical scrollbars have power thumbs.
  1537. printerFont       ・ Font to print documents.
  1538. printerFontSize・ Size to print documents.
  1539. projectorAware ・ Respect projector resources.
  1540. savedState       ・ set to either "mpw", "think", or "none" depending on how 
  1541.                  much information you wish Alpha to save in the resource 
  1542.                  fork of the files you edit. See the "Files" section of 
  1543.                  this file for more information.
  1544. showInvisibles ・ Show spaces, tabs, crs.
  1545. showRowCol     ・ if set, row and col are continuously
  1546.                  displayed in the title bar. 
  1547. sortColumn     ・ column to use for sort routine.
  1548. sortedIsDefault・ if set, sorted is the default for 
  1549.                  function and section menus.
  1550. sortFuncsMenu  ・ Whether or not to sort the funcs menu.
  1551. suppressHeader ・ Suppress header on printed pages.
  1552. tagFile        ・ complete path-name of tag file
  1553. tile{Height,Left,Top,Width} ・ rectangle to tile windows
  1554.                  within.
  1555. tempMem        ・ Enable use of system temporary memory.
  1556. undoOn         ・ used to turn undo on and off. When undo
  1557.                  is turned off, all undo info is lost.
  1558.                  Useful when doing global replaces, etc.
  1559. wrapHigh       ・ Line length limit beyond which soft-wrapping occurs, if 
  1560.                  enabled.
  1561. wrapLow           ・      ""            ""
  1562.  
  1563.  
  1564.           Spellchecking
  1565.  
  1566. Alpha has the capability to interact with the spell-check 'Excalibur', 
  1567. written by Robert Gottshall and Rick Zaccone.  The menu item 'Spellcheck 
  1568. Window' is always available in the "Utils" menu.  Selecting this item will 
  1569. start up Excalibur and send an OpenDoc event describing the current window.  
  1570. For version 1.4 and earlier, if Alpha has to launch Excalibur you will need 
  1571. to dismiss Excalibur's opening dialog by hitting the Cancel button.  
  1572. Subsequent selections of the menu item will switch right into Excalibur 
  1573. with the correct file displayed.  In future versions, this will become even 
  1574. more automatic.
  1575.  
  1576. Excalibur is free, but not in the public domain.  It can be obtained from 
  1577. all the usual Internet ftp sites, as well as cs.umd.edu under 
  1578. pub/faculty/keleher/Alpha.
  1579.  
  1580.  
  1581.           International Users
  1582.  
  1583. Everything should work. If it doesn't, please tell me.
  1584.  
  1585.  
  1586.  
  1587.           Drag and Drop
  1588.  
  1589. Alpha supports drag and drop cut, copy, clear, and paste. To use this 
  1590. feature, select some text, then move the cursor over the selected text. 
  1591. The cursor should then turn into an open hand. Mouse down, and move the 
  1592. cursor to the place you wish to paste the text. When the mouse is 
  1593. released, the hilited text is moved to the new location.
  1594.  
  1595. Option-mouse does a "copy" instead. You can also drag selections between 
  1596. windows and to and from other applications, including the finder. Text 
  1597. can be deleted by dragging it to the trash can. 
  1598.  
  1599. You MUST have Apple's "Macintosh Drag And Drop" installed. Get a copy from Apple 
  1600. or via Alpha's web page.
  1601.  
  1602.  
  1603.  
  1604.           Status Bar
  1605.  
  1606. The stripe across the bottom of the screen is a floating window that 
  1607. displays status information, certain prompts (option-x, and see the func 
  1608. 'statusPrompt'), and the current row and column.
  1609.  
  1610. You can't make this window go away. However, both 'sizeWin' and 'moveWin' 
  1611. accept "StatusWin" as a window specification and will act on this window, 
  1612. so you can move the window offscreen if you really wish. The height
  1613. parameter to 'sizeWin' is ignored.
  1614.  
  1615. The status bar can be dragged if the flag 'lockStatus' is turned off.
  1616.  
  1617. Clicking over the row and column indicators allows you to jump to a 
  1618. particular line.
  1619.  
  1620. The left-most popup menu allows you to choose between simple wrapping when 
  1621. typing 
  1622.  
  1623. The left-most popup menu is the "File Flags" menu.  The next icon is the 
  1624. "Mode" popup menu, which shows the window's current mode and allows it to 
  1625. be changed.
  1626.  
  1627. Finally, if you turn horizontal scrollbars off (via the 'horScrollBar' 
  1628. flag in the "Config:Flags" menu, you haven't lost any real estate. 
  1629. Furthermore, when tiling windows vertically, you actually have *more* 
  1630. real estate. 
  1631.  
  1632.  
  1633.           Modes
  1634.  
  1635. Each window in Alpha is always in a single "mode", such as the "C++" mode, 
  1636. or the "TeX" mode.  A mode describes bindings and variable values 
  1637. particular to that mode.  The mode of the frontmost window is displayed and 
  1638. can be changed via the status bar.
  1639.  
  1640. Alpha sets modes for new windows based on file name suffixes.  For 
  1641. instance, "files.c" is started up in mode "C" because of the ".c" suffix.  
  1642. Below are some of the standard suffixes recognized by Alpha.  These 
  1643. suffixes can be changed via the 'Suffix Mapping' item in the "Config" menu. 
  1644. The default mode is "Text".
  1645.  
  1646.     .h, .c, .r                        C
  1647.     .cc, .cp, .cpp, .CPP, .C        C++
  1648.     .f .fcm .for .FOR                Fort
  1649.     .tcl                            Tcl
  1650.     .tex, .sty, .ltx, .dtx, .ins    TeX
  1651.     .pl                                Perl
  1652.     .html .HTML                        HTML
  1653.     
  1654. Bindings for a specific mode can be specified by passing the desired mode as 
  1655. the last argument to a 'bind' command (see "Key Bindings").
  1656.  
  1657. Alpha has two different types of immediately visible flags and variables: 
  1658. global and per-mode flags. These are listed in separate submenus under the 
  1659. Config menu.
  1660.  
  1661. "Mode" flags and variables are instantiated separately for each mode.  
  1662. These are inspected and set via the "Config:Current Mode" menu.  Changing 
  1663. these values affects every window in that mode, but doesn't affect windows 
  1664. in other modes.
  1665.  
  1666. The variables displayed in "Config:Current Mode" are all the variables that the 
  1667. current mode cares about.  The "Set Mode Menusノ" item allows you to specify 
  1668. which of the extra menus should be present whenever the frontmost window is 
  1669. in that mode.  Select multiple menus by shift-clicking.
  1670.  
  1671. See here for more information on defining your own modes.
  1672.  
  1673. See here for information on removing existing modes (for disk space).
  1674.  
  1675.           File Comparison
  1676.  
  1677. Version 5.94 and above can create UNIX "diffs" of two text files. Among 
  1678. other things, diffs allow you to easily pinpoint what has changed between 
  1679. two different versions of the same file. 
  1680.  
  1681. Alpha's interface (under the "Utils" menu) allows you to compare either 
  1682. the two topmost windows, or two arbitrary files (later, Alpha will be 
  1683. able to compare entire directories). Alpha opens the two files in windows 
  1684. at the top of the screen with the diff file at the bottom. You can 
  1685. navigate between individual differences in the diff file by using the Up 
  1686. and Down arrows. Pressing either a carriage return or the Enter key 
  1687. displays the affected portions of the two files in the above windows.
  1688.  
  1689. I'm currently using a hack of QUED's GNU diff port.  My hack allows 
  1690. it to work as an AppleEvent server.  However, it handles most errors by 
  1691. quitting without responding, and handles only a single message before 
  1692. quitting. It also doesn't deal with directories. 
  1693.  
  1694. The interface is a 'dosc' script event containing the command-line 
  1695. arguments that would be used in running 'diff' from a UNIX shell (see 
  1696. here).  The result is the diff.  On the command line, file names containing 
  1697. spaces can be specified by delimiting the entire file name with double 
  1698. quotes.  The source for my version of the diff application (crude though it 
  1699. is), is available in pub/faculty/keleher/Alpha on cs.umd.edu.
  1700.  
  1701. Bugs: The files must have line Mac terminations.
  1702.  
  1703.  
  1704.  
  1705.           HyperText
  1706.  
  1707. Alpha's hypertext is both more and less powerful than systems that use 
  1708. markup languages such as HTML. It's more powerful because the action 
  1709. taken upon hitting a hypertext link is any arbitrary Tcl script rather 
  1710. than just navigation. It's less powerful because the generality doesn't 
  1711. allow a standard notion of going "back" or "forward". In any case, two 
  1712. points:
  1713.     1) The hypertext is only intended for Alpha documentation, and links 
  1714.     should not need to be created by anyone who isn't writing docs.
  1715.     
  1716.     2) 'pushMark' is called before any hypertext link is executed. This 
  1717.        allows you to return to the previous spot by "Pop Mark"ing (from the 
  1718.        Edit menu).
  1719.     
  1720. If you *must* create hypertext links, use the insertColorEscape command.
  1721.  
  1722.  
  1723.  
  1724.           Limitations
  1725.  
  1726. - Apple's listproc seems to have a total size limit of 32k characters. 
  1727.   This effectively limits tag searches to about 4000 function names.
  1728.  
  1729.  
  1730.           Preferences
  1731.  
  1732. Alpha saves settings between sessions by writing them to files in an 
  1733. "Alpha" sub-folder of the system preferences folder.  Additionally, Alpha 
  1734. will source a file called "prefs.tcl" from this sub-folder if it exists.  
  1735. You can view or remove the settings currently being saved there at any time 
  1736. via the "View/Remove Saved Settingsノ" from the Edit menu. You can edit 
  1737. the prefs.tcl file via the "Edit prefs.tcl" item. 
  1738.  
  1739. Never add manually add text to the defs.tcl or arrdefs.tcl files in the 
  1740. preferences folder. These files are automatically generated and read by 
  1741. the addDef etc. functions. If you need to save variable definition from 
  1742. Tcl code, addDef etc. is your friend. 
  1743.  
  1744. If you want to have arbitary code executed on startup, you can manually 
  1745. place this in the prefs.tcl file.
  1746.  
  1747. Holding down the shift key at startup causes Alpha to skip all preferences 
  1748. files.
  1749.  
  1750.  
  1751.           Changing Alpha's Behavior
  1752.  
  1753. Alpha's behavior can be modified in four primary ways.  The first is by 
  1754. changing flag and variable values.  Mode-independent flags and variables 
  1755. are under the "Config:Flags" menu.  Mode-dependent flags and variables are 
  1756. in "Config:Current Mode".  Values of all of these flags and variables are 
  1757. saved when Alpha exits.
  1758.  
  1759. The second method is to add bindings or Tcl procs to 'prefs.tcl', Alpha's 
  1760. preference file.  This file is accessible from the "Config" menu as well.  
  1761. 'prefs.tcl' is sourced at the end of Alpha's startup procedure.
  1762.  
  1763. The third way to modify Alpha's behavior is to create mode-specific prefs 
  1764. files. These files are created through the Config menu. Mode-specific prefs 
  1765. are loaded after the corresponding mode has been entered for the first 
  1766. time.
  1767.  
  1768. The final recomended way to modify Alpha is to create files that are 
  1769. sourced after corresponding files in Alpha's :Tcl:SystemCode directory. See 
  1770. here for more details.
  1771.  
  1772. Finally, you could just hack the files in SystemCode directly. However, 
  1773. you should definitely know what you are doing if you resort to this method, 
  1774. and it's definitely *not* portable from one version of Alpha to the next.
  1775.  
  1776.  
  1777.  
  1778.           HTML
  1779.  
  1780. See here.
  1781.  
  1782.  
  1783.  
  1784.           Internet Config
  1785.  
  1786. "Internet Config" is a freeware utility that holds system-wide preferences, 
  1787. especially preferences that might be accessed by more than one 
  1788. application.  For example, Internet Config stores pointers to helpers for 
  1789. web services, ftp, etc.  
  1790.  
  1791. Alpha supports "Internet Config" in the following ways: (i) 
  1792. command-clicking on highlighted text causes the text to be sent to Internet 
  1793. Config to be launched, (ii) the Internet Config menu allows either Internet 
  1794. Config itself, or several of it's internet helpers, to be started, and iii) 
  1795. Alpha can query internet config for path names in the "Config:App Paths" 
  1796. dialog. 
  1797.  
  1798. Click here for more information.  Once you have installed it and set up 
  1799. your ftp helper app through Internet Config, you can retrieve the entire 
  1800. package by clicking here.
  1801.  
  1802. The "URLs" submenu allows you to store a few commonly used URLs and to 
  1803. launch them, regardless of what helper they are directed to.
  1804.  
  1805. For instance, my menu includes 
  1806.  
  1807. New York Times       "http://www.nytimes.com/info/contents/contents.html"
  1808. Latest TCL Source    "ftp://ftp.aud.alcatel.com/tcl/ftp.smli.com/mac/"
  1809. Down                 "ftp://keleher:passwd@cs.umd.edu/down/"
  1810.  
  1811. where 'passwd' is replaced by my real password (and is understood by 
  1812. Anarchy, among others).
  1813.  
  1814. The function icURL can be to send URLs to internet config. For instance, I 
  1815. have the following proc defined in my prefs that allows me to access any 
  1816. arbtrary directy of my unix box at school merely by typing "ftp <dir>":
  1817.  
  1818.     proc ftp {{arg ""}} {
  1819.         icURL "ftp://keleher:passwd@cs.umd.edu/$arg"
  1820.     }
  1821.  
  1822.  
  1823.           Calculator
  1824.  
  1825. Alpha now has its own calculator :-), entirely implemented in Tcl.  This is 
  1826. just a quick-and-dirty RPN stack calculator, works on both signed and
  1827. unsigned decimals, hex integers, and floating point.  I put it together for 
  1828. my own use, not yours, but feel free to use it as long as you don't complain 
  1829. about what it doesn't do. Improvements, of course, are welcome.
  1830.  
  1831. Operations:                                                             
  1832.     +,-,*,/,|,&,%    Top    of stack is    'y', next is 'x'. Does x OP    y.     
  1833.     ~                bitwise NOT                                         
  1834.     ^                x eor y                                             
  1835.     <                x << y                                             
  1836.     >                x >> y                                             
  1837.     c                change y's sign                                     
  1838.     q                dup    y                                             
  1839.     i                swap x and y                                     
  1840.     m                switch signed/unsigned/hex modes                         
  1841.     x                show current mode
  1842.     h or ?            help
  1843.     <delete>        pop    stack                                         
  1844.     <space>            enter number                                     
  1845.  
  1846. Invoke from the File menu, holding down the shift key.
  1847.  
  1848.  
  1849.  
  1850.           Templates
  1851.  
  1852. Temporary marks can also be used to with language construct templates. The 
  1853. file "template.tcl" contains an example implementing a template for C's 
  1854. 'for' command. Depressing control-i will insert a template for the "for" 
  1855. command into the current window. Five temporary marks are defined in the 
  1856. for structure, three inside the parenthesis, one where the "for" body text 
  1857. will be inserted, and one after outside the for body entirely. Depressing 
  1858. control-shift-i moves the cursor to the next of the five temporary marks 
  1859. allowing quick entry of the entire command.
  1860.  
  1861.  
  1862.           Ftp Browser
  1863.  
  1864. The 'FTP' menu allows quick access to files on a remote ftp server, useful 
  1865. for those that work on both unix and mac systems. You should have Anarchy 
  1866. installed as your ftp server, although Fetch might work as well. Popup menu 
  1867. in title of any "remote" window allows repeated access to those 
  1868. directories.
  1869.  
  1870. More docs later, once someone sends them to me. Please volunteer....
  1871.  
  1872.  
  1873.  
  1874.  
  1875.           Deconstructing Alpha
  1876.  
  1877. Starting with 6.2, Alpha's Tcl source has become much more modular, to the 
  1878. extent that you can now easily throw away modes and menus that you don't want. 
  1879. This is accomplished via the "Deconstructノ" item from the Config menu. 
  1880. This *permanently* removes tcl and help files pertaining to the offending 
  1881. modes and menus. Only a re-installation can get them back.
  1882.  
  1883.  
  1884.  
  1885. Remember, Alpha's official home site is:
  1886.  
  1887.         http://www.cs.umd.edu/~keleher/alpha.html
  1888.  
  1889.                 or
  1890.  
  1891.         ftp://www.cs.umd.edu/pub/faculty/keleher/Alpha/
  1892.  
  1893.